package org.tom.org.util;

import org.springframework.beans.BeanUtils;
import org.tom.org.domain.Employee;
import org.tom.user.domain.Logininfo;

public class Employee2Logininfo {
    public static Logininfo emp2Logininfo(Employee employee){
        Logininfo logininfo = new Logininfo();
        // copyProperties这个方法是将相同的字段才复制过去
        BeanUtils.copyProperties(employee, logininfo);
        logininfo.setType(0);
        logininfo.setDisable(1);
        return logininfo;
    }
}
